<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    /**
     * @param {number[][]} accounts
     * @return {number}
     */
    var maximumWealth = function (accounts) {
      let max = -Infinity;
      for (let i = 0; i < accounts.length; i++) {
        let sum = 0;
        for (let j = 0; j < accounts[i].length; j++) {
          sum+=accounts[i][j];
        }
        if(max<sum){
          max = sum
        }
      }
      return max
    };

    console.log(maximumWealth([[1,5],[7,3],[3,5]]));
  </script>
</body>

</html>